home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / lispref.info-32.z / lispref.info-32
Encoding:
GNU Info File  |  1998-05-21  |  50.7 KB  |  1,136 lines

  1. This is Info file ../../info/lispref.info, produced by Makeinfo version
  2. 1.68 from the input file lispref.texi.
  3.  
  4.    Edition History:
  5.  
  6.    GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
  7. Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
  8. Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
  9. XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
  10. GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
  11. Programmer's Manual (for 19.13) Third Edition, July 1995 XEmacs Lisp
  12. Reference Manual (for 19.14 and 20.0) v3.1, March 1996 XEmacs Lisp
  13. Reference Manual (for 19.15 and 20.1, 20.2) v3.2, April, May 1997
  14.  
  15.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
  16. Foundation, Inc.  Copyright (C) 1994, 1995 Sun Microsystems, Inc.
  17. Copyright (C) 1995, 1996 Ben Wing.
  18.  
  19.    Permission is granted to make and distribute verbatim copies of this
  20. manual provided the copyright notice and this permission notice are
  21. preserved on all copies.
  22.  
  23.    Permission is granted to copy and distribute modified versions of
  24. this manual under the conditions for verbatim copying, provided that the
  25. entire resulting derived work is distributed under the terms of a
  26. permission notice identical to this one.
  27.  
  28.    Permission is granted to copy and distribute translations of this
  29. manual into another language, under the above conditions for modified
  30. versions, except that this permission notice may be stated in a
  31. translation approved by the Foundation.
  32.  
  33.    Permission is granted to copy and distribute modified versions of
  34. this manual under the conditions for verbatim copying, provided also
  35. that the section entitled "GNU General Public License" is included
  36. exactly as in the original, and provided that the entire resulting
  37. derived work is distributed under the terms of a permission notice
  38. identical to this one.
  39.  
  40.    Permission is granted to copy and distribute translations of this
  41. manual into another language, under the above conditions for modified
  42. versions, except that the section entitled "GNU General Public License"
  43. may be included in a translation approved by the Free Software
  44. Foundation instead of in the original English.
  45.  
  46. 
  47. File: lispref.info,  Node: Extent Endpoints,  Next: Finding Extents,  Prev: Creating and Modifying Extents,  Up: Extents
  48.  
  49. Extent Endpoints
  50. ================
  51.  
  52.    Every extent has a start position and an end position, and logically
  53. affects the characters between those positions.  Normally the start and
  54. end positions must both be valid positions in the extent's buffer or
  55. string.  However, both endpoints can be `nil', meaning the extent is
  56. detached.  *Note Detached Extents::.
  57.  
  58.    Whether the extent overlaps its endpoints is governed by its
  59. `start-open' and `end-open' properties.  Insertion of a character at a
  60. closed endpoint will expand the extent to include that character;
  61. insertion at an open endpoint will not.  Similarly, functions such as
  62. `extent-at' that scan over all extents overlapping a particular
  63. position will include extents with a closed endpoint at that position,
  64. but not extents with an open endpoint.
  65.  
  66.    Note that the `start-closed' and `end-closed' properties are
  67. equivalent to `start-open' and `end-open' with the opposite sense.
  68.  
  69.    Both endpoints can be equal, in which case the extent includes no
  70. characters but still exists in the buffer or string.  Zero-length
  71. extents are used to represent annotations (*note Annotations::.) and can
  72. be used as a more powerful form of a marker.  Deletion of all the
  73. characters in an extent may or may not result in a zero-length extent;
  74. this depends on the `detachable' property (*note Detached Extents::.).
  75. Insertion at the position of a zero-length extent expands the extent if
  76. both endpoints are closed; goes before the extent if it has the
  77. `start-open' property; and goes after the extent if it has the
  78. `end-open' property.  Zero-length extents with both the `start-open'
  79. and `end-open' properties are treated as if their starting point were
  80. closed.  Deletion of a character on a side of a zero-length extent
  81. whose corresponding endpoint is closed causes the extent to be detached
  82. if its `detachable' property is set; if the corresponding endpoint is
  83. open, the extent remains in the buffer, moving as necessary.
  84.  
  85.    Extents are ordered within a buffer or string by increasing start
  86. position, and then by decreasing end position (this is called the
  87. "display order").
  88.  
  89.  - Function: extent-start-position EXTENT
  90.      This function returns the start position of EXTENT.
  91.  
  92.  - Function: extent-end-position EXTENT
  93.      This function returns the end position of EXTENT.
  94.  
  95.  - Function: extent-length EXTENT
  96.      This function returns the length of EXTENT in characters.  If the
  97.      extent is detached, this returns `0'.  If the extent is not
  98.      detached, this is equivalent to
  99.           (- (extent-end-position EXTENT) (extent-start-position EXTENT))
  100.  
  101.  - Function: set-extent-endpoints EXTENT START END &optional
  102.           BUFFER-OR-STRING
  103.      This function sets the start and end position of EXTENT to START
  104.      and END.  If both are `nil', this is equivalent to `detach-extent'.
  105.  
  106.      BUFFER-OR-STRING specifies the new buffer or string that the
  107.      extent should be in, and defaults to EXTENT's buffer or string.
  108.      (If `nil', and EXTENT is in no buffer and no string, it defaults
  109.      to the current buffer.)
  110.  
  111.      See documentation on `detach-extent' for a discussion of undo
  112.      recording.
  113.  
  114. 
  115. File: lispref.info,  Node: Finding Extents,  Next: Mapping Over Extents,  Prev: Extent Endpoints,  Up: Extents
  116.  
  117. Finding Extents
  118. ===============
  119.  
  120.    The following functions provide a simple way of determining the
  121. extents in a buffer or string.  A number of more sophisticated
  122. primitives for mapping over the extents in a range of a buffer or string
  123. are also provided (*note Mapping Over Extents::.).  When reading through
  124. this section, keep in mind the way that extents are ordered (*note
  125. Extent Endpoints::.).
  126.  
  127.  - Function: extent-list &optional BUFFER-OR-STRING FROM TO FLAGS
  128.      This function returns a list of the extents in BUFFER-OR-STRING.
  129.      BUFFER-OR-STRING defaults to the current buffer if omitted.  FROM
  130.      and TO can be used to limit the range over which extents are
  131.      returned; if omitted, all extents in the buffer or string are
  132.      returned.
  133.  
  134.      More specifically, if a range is specified using FROM and TO, only
  135.      extents that overlap the range (i.e. begin or end inside of the
  136.      range) are included in the list.  FROM and TO default to the
  137.      beginning and end of BUFFER-OR-STRING, respectively.
  138.  
  139.      FLAGS controls how end cases are treated.  For a discussion of
  140.      this, and exactly what "overlap" means, see `map-extents'.
  141.  
  142.    Functions that create extents must be prepared for the possibility
  143. that there are other extents in the same area, created by other
  144. functions.  To deal with this, functions typically mark their own
  145. extents by setting a particular property on them.  The following
  146. function makes it easier to locate those extents.
  147.  
  148.  - Function: extent-at POS &optional OBJECT PROPERTY BEFORE AT-FLAG
  149.      This function finds the "smallest" extent (i.e., the last one in
  150.      the display order) at (i.e., overlapping) POS in OBJECT (a buffer
  151.      or string) having PROPERTY set.  OBJECT defaults to the current
  152.      buffer.  PROPERTY defaults to `nil', meaning that any extent will
  153.      do.  Returns `nil' if there is no matching extent at POS.  If the
  154.      fourth argument BEFORE is not `nil', it must be an extent; any
  155.      returned extent will precede that extent.  This feature allows
  156.      `extent-at' to be used by a loop over extents.
  157.  
  158.      AT-FLAG controls how end cases are handled (i.e. what "at" really
  159.      means), and should be one of:
  160.  
  161.     `nil'
  162.  
  163.     `after'
  164.           An extent is at POS if it covers the character after POS.
  165.           This is consistent with the way that text properties work.
  166.  
  167.     `before'
  168.           An extent is at POS if it covers the character before POS.
  169.  
  170.     `at'
  171.           An extent is at POS if it overlaps or abuts POS.  This
  172.           includes all zero-length extents at POS.
  173.  
  174.      Note that in all cases, the start-openness and end-openness of the
  175.      extents considered is ignored.  If you want to pay attention to
  176.      those properties, you should use `map-extents', which gives you
  177.      more control.
  178.  
  179.    The following low-level functions are provided for explicitly
  180. traversing the extents in a buffer according to the display order.
  181. These functions are mostly intended for debugging - in normal
  182. operation, you should probably use `mapcar-extents' or `map-extents',
  183. or loop using the BEFORE argument to `extent-at', rather than creating
  184. a loop using `next-extent'.
  185.  
  186.  - Function: next-extent EXTENT
  187.      Given an extent EXTENT, this function returns the next extent in
  188.      the buffer or string's display order.  If EXTENT is a buffer or
  189.      string, this returns the first extent in the buffer or string.
  190.  
  191.  - Function: previous-extent EXTENT
  192.      Given an extent EXTENT, this function returns the previous extent
  193.      in the buffer or string's display order.  If EXTENT is a buffer or
  194.      string, this returns the last extent in the buffer or string.
  195.  
  196. 
  197. File: lispref.info,  Node: Mapping Over Extents,  Next: Extent Properties,  Prev: Finding Extents,  Up: Extents
  198.  
  199. Mapping Over Extents
  200. ====================
  201.  
  202.    The most basic and general function for mapping over extents is
  203. called `map-extents'.  You should read through the definition of this
  204. function to familiarize yourself with the concepts and optional
  205. arguments involved.  However, in practice you may find it more
  206. convenient to use the function `mapcar-extents' or to create a loop
  207. using the `before' argument to `extent-at' (*note Finding Extents::.).
  208.  
  209.  - Function: map-extents FUNCTION &optional OBJECT FROM TO MAPARG FLAGS
  210.           PROPERTY VALUE
  211.      This function maps FUNCTION over the extents which overlap a
  212.      region in OBJECT.  OBJECT is normally a buffer or string but could
  213.      be an extent (see below).  The region is normally bounded by
  214.      [FROM, TO) (i.e. the beginning of the region is closed and the end
  215.      of the region is open), but this can be changed with the FLAGS
  216.      argument (see below for a complete discussion).
  217.  
  218.      FUNCTION is called with the arguments (extent, MAPARG).  The
  219.      arguments OBJECT, FROM, TO, MAPARG, and FLAGS are all optional and
  220.      default to the current buffer, the beginning of OBJECT, the end of
  221.      OBJECT, NIL, and NIL, respectively.  `map-extents' returns the
  222.      first non-`nil' result produced by FUNCTION, and no more calls to
  223.      FUNCTION are made after it returns non-`nil'.
  224.  
  225.      If OBJECT is an extent, FROM and TO default to the extent's
  226.      endpoints, and the mapping omits that extent and its predecessors.
  227.      This feature supports restarting a loop based on `map-extents'.
  228.      Note: OBJECT must be attached to a buffer or string, and the
  229.      mapping is done over that buffer or string.
  230.  
  231.      An extent overlaps the region if there is any point in the extent
  232.      that is also in the region. (For the purpose of overlap,
  233.      zero-length extents and regions are treated as closed on both ends
  234.      regardless of their endpoints' specified open/closedness.) Note
  235.      that the endpoints of an extent or region are considered to be in
  236.      that extent or region if and only if the corresponding end is
  237.      closed.  For example, the extent [5,7] overlaps the region [2,5]
  238.      because 5 is in both the extent and the region.  However, (5,7]
  239.      does not overlap [2,5] because 5 is not in the extent, and neither
  240.      [5,7] nor (5,7] overlaps the region [2,5) because 5 is not in the
  241.      region.
  242.  
  243.      The optional FLAGS can be a symbol or a list of one or more
  244.      symbols, modifying the behavior of `map-extents'.  Allowed symbols
  245.      are:
  246.  
  247.     `end-closed'
  248.           The region's end is closed.
  249.  
  250.     `start-open'
  251.           The region's start is open.
  252.  
  253.     `all-extents-closed'
  254.           Treat all extents as closed on both ends for the purpose of
  255.           determining whether they overlap the region, irrespective of
  256.           their actual open- or closedness.
  257.  
  258.     `all-extents-open'
  259.           Treat all extents as open on both ends.
  260.  
  261.     `all-extents-closed-open'
  262.           Treat all extents as start-closed, end-open.
  263.  
  264.     `all-extents-open-closed'
  265.           Treat all extents as start-open, end-closed.
  266.  
  267.     `start-in-region'
  268.           In addition to the above conditions for extent overlap, the
  269.           extent's start position must lie within the specified region.
  270.           Note that, for this condition, open start positions are
  271.           treated as if 0.5 was added to the endpoint's value, and open
  272.           end positions are treated as if 0.5 was subtracted from the
  273.           endpoint's value.
  274.  
  275.     `end-in-region'
  276.           The extent's end position must lie within the region.
  277.  
  278.     `start-and-end-in-region'
  279.           Both the extent's start and end positions must lie within the
  280.           region.
  281.  
  282.     `start-or-end-in-region'
  283.           Either the extent's start or end position must lie within the
  284.           region.
  285.  
  286.     `negate-in-region'
  287.           The condition specified by a `*-in-region' flag must *not*
  288.           hold for the extent to be considered.
  289.  
  290.      At most one of `all-extents-closed', `all-extents-open',
  291.      `all-extents-closed-open', and `all-extents-open-closed' may be
  292.      specified.
  293.  
  294.      At most one of `start-in-region', `end-in-region',
  295.      `start-and-end-in-region', and `start-or-end-in-region' may be
  296.      specified.
  297.  
  298.      If optional arg PROPERTY is non-`nil', only extents with that
  299.      property set on them will be visited.  If optional arg VALUE is
  300.      non-`nil', only extents whose value for that property is `eq' to
  301.      VALUE will be visited.
  302.  
  303.    If you want to map over extents and accumulate a list of results,
  304. the following function may be more convenient than `map-extents'.
  305.  
  306.  - Function: mapcar-extents FUNCTION &optional PREDICATE
  307.           BUFFER-OR-STRING FROM TO FLAGS PROPERTY VALUE
  308.      This function applies FUNCTION to all extents which overlap a
  309.      region in BUFFER-OR-STRING.  The region is delimited by FROM and
  310.      TO.  FUNCTION is called with one argument, the extent.  A list of
  311.      the values returned by FUNCTION is returned.  An optional
  312.      PREDICATE may be used to further limit the extents over which
  313.      FUNCTION is mapped.  The optional arguments FLAGS, PROPERTY, and
  314.      VALUE may also be used to control the extents passed to PREDICATE
  315.      or FUNCTION, and have the same meaning as in `map-extents'.
  316.  
  317.  - Function: map-extent-children FUNCTION &optional OBJECT FROM TO
  318.           MAPARG FLAGS PROPERTY VALUE
  319.      This function is similar to `map-extents', but differs in that:
  320.  
  321.         * It only visits extents which start in the given region.
  322.  
  323.         * After visiting an extent E, it skips all other extents which
  324.           start inside E but end before E's end.
  325.  
  326.      Thus, this function may be used to walk a tree of extents in a
  327.      buffer:
  328.           (defun walk-extents (buffer &optional ignore)
  329.             (map-extent-children 'walk-extents buffer))
  330.  
  331.  - Function: extent-in-region-p EXTENT &optional FROM TO FLAGS
  332.      This function returns T if `map-extents' would visit EXTENT if
  333.      called with the given arguments.
  334.  
  335. 
  336. File: lispref.info,  Node: Extent Properties,  Next: Detached Extents,  Prev: Mapping Over Extents,  Up: Extents
  337.  
  338. Properties of Extents
  339. =====================
  340.  
  341.    Each extent has a property list associating property names with
  342. values.  Some property names have predefined meanings, and can usually
  343. only assume particular values.  Assigning other values to such a
  344. property either cause the value to be converted into a legal value
  345. (e.g., assigning anything but `nil' to a Boolean property will cause
  346. the value of `t' to be assigned to the property) or will cause an
  347. error.  Property names without predefined meanings can be assigned any
  348. value.  An undefined property is equivalent to a property with a value
  349. of `nil', or with a particular default value in the case of properties
  350. with predefined meanings.  Note that, when an extent is created, the
  351. `end-open' and `detachable' properties are set on it.
  352.  
  353.    If an extent has a parent, all of its properties actually derive
  354. from that parent (or from the root ancestor if the parent in turn has a
  355. parent), and setting a property of the extent actually sets that
  356. property on the parent.  *Note Extent Parents::.
  357.  
  358.  - Function: extent-property EXTENT PROPERTY
  359.      This function returns the value of PROPERTY in EXTENT.  If
  360.      PROPERTY is undefined, `nil' is returned.
  361.  
  362.  - Function: extent-properties EXTENT
  363.      This function returns a list of all of EXTENT's properties that do
  364.      not have the value of `nil' (or the default value, for properties
  365.      with predefined meanings).
  366.  
  367.  - Function: set-extent-property EXTENT PROPERTY VALUE
  368.      This function sets PROPERTY to VALUE in EXTENT. (If PROPERTY has a
  369.      predefined meaning, only certain values are allowed, and some
  370.      values may be converted to others before being stored.)
  371.  
  372.  - Function: set-extent-properties EXTENT PLIST
  373.      Change some properties of EXTENT.  PLIST is a property list.  This
  374.      is useful to change many extent properties at once.
  375.  
  376.    The following table lists the properties with predefined meanings,
  377. along with their allowable values.
  378.  
  379. `detached'
  380.      (Boolean) Whether the extent is detached.   Setting this is the
  381.      same as calling `detach-extent'.  *Note Detached Extents::.
  382.  
  383. `destroyed'
  384.      (Boolean) Whether the extent has been deleted.  Setting this is
  385.      the same as calling `delete-extent'.
  386.  
  387. `priority'
  388.      (integer) The extent's redisplay priority.  Defaults to 0.  *Note
  389.      priority: Intro to Extents.  This property can also be set with
  390.      `set-extent-priority' and accessed with `extent-priority'.
  391.  
  392. `start-open'
  393.      (Boolean) Whether the start position of the extent is open,
  394.      meaning that characters inserted at that position go outside of
  395.      the extent.  *Note Extent Endpoints::.
  396.  
  397. `start-closed'
  398.      (Boolean) Same as `start-open' but with the opposite sense.
  399.      Setting this property clears `start-open' and vice-versa.
  400.  
  401. `end-open'
  402.      (Boolean) Whether the end position of the extent is open, meaning
  403.      that characters inserted at that position go outside of the
  404.      extent.  This is `t' by default.  *Note Extent Endpoints::.
  405.  
  406. `end-closed'
  407.      (Boolean) Same as `end-open' but with the opposite sense.  Setting
  408.      this property clears `end-open' and vice-versa.
  409.  
  410. `read-only'
  411.      (Boolean) Whether text within this extent will be unmodifiable.
  412.  
  413. `face'
  414.      (face, face name, list of faces or face names, or `nil') The face
  415.      in which to display the extent's text.  This property can also be
  416.      set with `set-extent-face' and accessed with `extent-face'.  Note
  417.      that if a list of faces is specified, the faces are merged
  418.      together, with faces earlier in the list having priority over
  419.      faces later in the list.
  420.  
  421. `mouse-face'
  422.      (face, face name, list of faces or face names, or `nil') The face
  423.      used to display the extent when the mouse moves over it.  This
  424.      property can also be set with `set-extent-mouse-face' and accessed
  425.      with `extent-mouse-face'.  Note that if a list of faces is
  426.      specified, the faces are merged together, with faces earlier in
  427.      the list having priority over faces later in the list.  *Note
  428.      Extents and Events::.
  429.  
  430. `pointer'
  431.      (pointer glyph)  The glyph used as the pointer when the mouse
  432.      moves over the extent.  This takes precedence over the
  433.      `text-pointer-glyph' and `nontext-pointer-glyph' variables.  If
  434.      for any reason this glyph is an invalid pointer, the standard
  435.      glyphs will be used as fallbacks.  *Note Mouse Pointer::
  436.  
  437. `detachable'
  438.      (Boolean) Whether this extent becomes detached when all of the
  439.      text it covers is deleted.  This is `t' by default.  *Note
  440.      Detached Extents::.
  441.  
  442. `duplicable'
  443.      (Boolean) Whether this extent should be copied into strings, so
  444.      that kill, yank, and undo commands will restore or copy it.  *Note
  445.      Duplicable Extents::.
  446.  
  447. `unique'
  448.      (Boolean) Meaningful only in conjunction with `duplicable'.  When
  449.      this is set, there may be only one instance of this extent
  450.      attached at a time.  *Note Duplicable Extents::.
  451.  
  452. `invisible'
  453.      (Boolean) If `t', text under this extent will not be displayed -
  454.      it will look as if the text is not there at all.
  455.  
  456. `keymap'
  457.      (keymap or `nil') This keymap is consulted for mouse clicks on this
  458.      extent or keypresses made while `point' is within the extent.
  459.      *Note Extents and Events::.
  460.  
  461. `copy-function'
  462.      This is a hook that is run when a duplicable extent is about to be
  463.      copied from a buffer to a string (or the kill ring).  *Note
  464.      Duplicable Extents::.
  465.  
  466. `paste-function'
  467.      This is a hook that is run when a duplicable extent is about to be
  468.      copied from a string (or the kill ring) into a buffer.  *Note
  469.      Duplicable Extents::.
  470.  
  471. `begin-glyph'
  472.      (glyph or `nil') This extent's begin glyph.  *Note Annotations::.
  473.  
  474. `end-glyph'
  475.      (glyph or `nil') This extent's end glyph.  *Note Annotations::.
  476.  
  477. `begin-glyph-layout'
  478.      (`text', `whitespace', `inside-margin', or `outside-margin') The
  479.      layout policy for this extent's begin glyph.  Defaults to `text'.
  480.      *Note Annotations::.
  481.  
  482. `end-glyph-layout'
  483.      (`text', `whitespace', `inside-margin', or `outside-margin') The
  484.      layout policy for this extent's end glyph.  Defaults to `text'.
  485.      *Note Annotations::.
  486.  
  487. `initial-redisplay-function'
  488.      (any funcallable object) The function to be called the first time
  489.      (a part of) the extent is redisplayed.  It will be called with the
  490.      extent as its argument.
  491.  
  492.      This is used by `lazy-shot' to implement lazy font-locking.  The
  493.      functionality is still experimental, and may change without further
  494.      notice.
  495.  
  496.    The following convenience functions are provided for accessing
  497. particular properties of an extent.
  498.  
  499.  - Function: extent-face EXTENT
  500.      This function returns the `face' property of EXTENT.  This might
  501.      also return a list of face names.  Do not modify this list
  502.      directly!  Instead, use `set-extent-face'.
  503.  
  504.      Note that you can use `eq' to compare lists of faces as returned
  505.      by `extent-face'.  In other words, if you set the face of two
  506.      different extents to two lists that are `equal' but not `eq', then
  507.      the return value of `extent-face' on the two extents will return
  508.      the identical list.
  509.  
  510.  - Function: extent-mouse-face EXTENT
  511.      This function returns the `mouse-face' property of EXTENT.  This
  512.      might also return a list of face names.  Do not modify this list
  513.      directly!  Instead, use `set-extent-mouse-face'.
  514.  
  515.      Note that you can use `eq' to compare lists of faces as returned
  516.      by `extent-mouse-face', just like for `extent-face'.
  517.  
  518.  - Function: extent-priority EXTENT
  519.      This function returns the `priority' property of EXTENT.
  520.  
  521.  - Function: extent-keymap EXTENT
  522.      This function returns the `keymap' property of EXTENT.
  523.  
  524.  - Function: extent-begin-glyph-layout EXTENT
  525.      This function returns the `begin-glyph-layout' property of EXTENT,
  526.      i.e. the layout policy associated with the EXTENT's begin glyph.
  527.  
  528.  - Function: extent-end-glyph-layout EXTENT
  529.      This function returns the `end-glyph-layout' property of EXTENT,
  530.      i.e. the layout policy associated with the EXTENT's end glyph.
  531.  
  532.  - Function: extent-begin-glyph EXTENT
  533.      This function returns the `begin-glyph' property of EXTENT, i.e.
  534.      the glyph object displayed at the beginning of EXTENT.  If there
  535.      is none, `nil' is returned.
  536.  
  537.  - Function: extent-end-glyph EXTENT
  538.      This function returns the `end-glyph' property of EXTENT, i.e. the
  539.      glyph object displayed at the end of EXTENT.  If there is none,
  540.      `nil' is returned.
  541.  
  542.    The following convenience functions are provided for setting
  543. particular properties of an extent.
  544.  
  545.  - Function: set-extent-priority EXTENT PRI
  546.      This function sets the `priority' property of EXTENT to PRI.
  547.  
  548.  - Function: set-extent-face EXTENT FACE
  549.      This function sets the `face' property of EXTENT to FACE.
  550.  
  551.  - Function: set-extent-mouse-face EXTENT FACE
  552.      This function sets the `mouse-face' property of EXTENT to FACE.
  553.  
  554.  - Function: set-extent-keymap EXTENT KEYMAP
  555.      This function sets the `keymap' property of EXTENT to KEYMAP.
  556.      KEYMAP must be either a keymap object, or `nil'.
  557.  
  558.  - Function: set-extent-begin-glyph-layout EXTENT LAYOUT
  559.      This function sets the `begin-glyph-layout' property of EXTENT to
  560.      LAYOUT.
  561.  
  562.  - Function: set-extent-end-glyph-layout EXTENT LAYOUT
  563.      This function sets the `end-glyph-layout' property of EXTENT to
  564.      LAYOUT.
  565.  
  566.  - Function: set-extent-begin-glyph EXTENT BEGIN-GLYPH &optional LAYOUT
  567.      This function sets the `begin-glyph' and `glyph-layout' properties
  568.      of EXTENT to BEGIN-GLYPH and LAYOUT, respectively. (LAYOUT
  569.      defaults to `text' if not specified.)
  570.  
  571.  - Function: set-extent-end-glyph EXTENT END-GLYPH &optional LAYOUT
  572.      This function sets the `end-glyph' and `glyph-layout' properties
  573.      of EXTENT to END-GLYPH and LAYOUT, respectively. (LAYOUT defaults
  574.      to `text' if not specified.)
  575.  
  576.  - Function: set-extent-initial-redisplay-function EXTENT FUNCTION
  577.      This function sets the `initial-redisplay-function' property of the
  578.      extent to FUNCTION.
  579.  
  580. 
  581. File: lispref.info,  Node: Detached Extents,  Next: Extent Parents,  Prev: Extent Properties,  Up: Extents
  582.  
  583. Detached Extents
  584. ================
  585.  
  586.    A detached extent is an extent that is not attached to a buffer or
  587. string but can be re-inserted.  Detached extents have a start position
  588. and end position of `nil'.  Extents can be explicitly detached using
  589. `detach-extent'.  An extent is also detached when all of its characters
  590. are all killed by a deletion, if its `detachable' property is set; if
  591. this property is not set, the extent becomes a zero-length extent.
  592. (Zero-length extents with the `detachable' property set behave
  593. specially.  *Note zero-length extents: Extent Endpoints.)
  594.  
  595.  - Function: detach-extent EXTENT
  596.      This function detaches EXTENT from its buffer or string.  If
  597.      EXTENT has the `duplicable' property, its detachment is tracked by
  598.      the undo mechanism.  *Note Duplicable Extents::.
  599.  
  600.  - Function: extent-detached-p EXTENT
  601.      This function returns `nil' if EXTENT is detached, and `t'
  602.      otherwise.
  603.  
  604.  - Function: copy-extent EXTENT &optional OBJECT
  605.      This function makes a copy of EXTENT.  It is initially detached.
  606.      Optional argument OBJECT defaults to EXTENT's object (normally a
  607.      buffer or string, but could be `nil').
  608.  
  609.  - Function: insert-extent EXTENT &optional START END NO-HOOKS OBJECT
  610.      This function inserts EXTENT from START to END in OBJECT (a buffer
  611.      or string).  If EXTENT is detached from a different buffer or
  612.      string, or in most cases when EXTENT is already attached, the
  613.      extent will first be copied as if with `copy-extent'.  This
  614.      function operates the same as if `insert' were called on a string
  615.      whose extent data calls for EXTENT to be inserted, except that if
  616.      NO-HOOKS is non-`nil', EXTENT's `paste-function' will not be
  617.      invoked.  *Note Duplicable Extents::.
  618.  
  619. 
  620. File: lispref.info,  Node: Extent Parents,  Next: Duplicable Extents,  Prev: Detached Extents,  Up: Extents
  621.  
  622. Extent Parents
  623. ==============
  624.  
  625.    An extent can have a parent extent set for it.  If this is the case,
  626. the extent derives all its properties from that extent and has no
  627. properties of its own.  The only "properties" that the extent keeps are
  628. the buffer or string it refers to and the start and end points.  (More
  629. correctly, the extent's own properties are shadowed.  If you later
  630. change the extent to have no parent, its own properties will become
  631. visible again.)
  632.  
  633.    It is possible for an extent's parent to itself have a parent, and
  634. so on.  Through this, a whole tree of extents can be created, all
  635. deriving their properties from one root extent.  Note, however, that
  636. you cannot create an inheritance loop - this is explicitly disallowed.
  637.  
  638.    Parent extents are used to implement the extents over the modeline.
  639.  
  640.  - Function: set-extent-parent EXTENT PARENT
  641.      This function sets the parent of EXTENT to PARENT.  If PARENT is
  642.      `nil', the extent is set to have no parent.
  643.  
  644.  - Function: extent-parent EXTENT
  645.      This function return the parents (if any) of EXTENT, or `nil'.
  646.  
  647.  - Function: extent-children EXTENT
  648.      This function returns a list of the children (if any) of EXTENT.
  649.      The children of an extent are all those extents whose parent is
  650.      that extent.  This function does not recursively trace children of
  651.      children.
  652.  
  653.  - Function: extent-descendants EXTENT
  654.      This function returns a list of all descendants of EXTENT,
  655.      including EXTENT.  This recursively applies `extent-children' to
  656.      any children of EXTENT, until no more children can be found.
  657.  
  658. 
  659. File: lispref.info,  Node: Duplicable Extents,  Next: Extents and Events,  Prev: Extent Parents,  Up: Extents
  660.  
  661. Duplicable Extents
  662. ==================
  663.  
  664.    If an extent has the `duplicable' property, it will be copied into
  665. strings, so that kill, yank, and undo commands will restore or copy it.
  666.  
  667.    Specifically:
  668.  
  669.    * When a string is created using `buffer-substring' or
  670.      `buffer-string', any duplicable extents in the region corresponding
  671.      to the string will be copied into the string (*note Buffer
  672.      Contents::.).  When the string in inserted into a buffer using
  673.      `insert', `insert-before-markers', `insert-buffer' or
  674.      `insert-buffer-substring', the extents in the string will be copied
  675.      back into the buffer (*note Insertion::.).  The extents in a
  676.      string can, of course, be retrieved explicitly using the standard
  677.      extent primitives over the string.
  678.  
  679.    * Similarly, when text is copied or cut into the kill ring, any
  680.      duplicable extents will be remembered and reinserted later when
  681.      the text is pasted back into a buffer.
  682.  
  683.    * When `concat' is called on strings, the extents in the strings are
  684.      copied into the resulting string.
  685.  
  686.    * When `substring' is called on a string, the relevant extents are
  687.      copied into the resulting string.
  688.  
  689.    * When a duplicable extent is detached by `detach-extent' or string
  690.      deletion, or inserted by `insert-extent' or string insertion, the
  691.      action is recorded by the undo mechanism so that it can be undone
  692.      later.  Note that if an extent gets detached and then a later undo
  693.      causes the extent to get reinserted, the new extent will not be
  694.      `eq' to the original extent.
  695.  
  696.    * Extent motion, face changes, and attachment via `make-extent' are
  697.      not recorded by the undo mechanism.  This means that extent changes
  698.      which are to be undo-able must be performed by character editing,
  699.      or by insertion and detachment of duplicable extents.
  700.  
  701.    * A duplicable extent's `copy-function' property, if non-`nil',
  702.      should be a function, and will be run when a duplicable extent is
  703.      about to be copied from a buffer to a string (or the kill ring).
  704.      It is called with three arguments: the extent and the buffer
  705.      positions within it which are being copied.  If this function
  706.      returns `nil', then the extent will not be copied; otherwise it
  707.      will.
  708.  
  709.    * A duplicable extent's `paste-function' property, if non-`nil',
  710.      should be a function, and will be run when a duplicable extent is
  711.      about to be copied from a string (or the kill ring) into a buffer.
  712.      It is called with three arguments: the original extent and the
  713.      buffer positions which the copied extent will occupy. (This hook
  714.      is run after the corresponding text has already been inserted into
  715.      the buffer.) Note that the extent argument may be detached when
  716.      this function is run.  If this function returns `nil', no extent
  717.      will be inserted.  Otherwise, there will be an extent covering the
  718.      range in question.
  719.  
  720.      Note: if the extent to be copied is already attached to the buffer
  721.      and overlaps the new range, the extent will simply be extended and
  722.      the `paste-function' will not be called.
  723.  
  724. 
  725. File: lispref.info,  Node: Extents and Events,  Next: Atomic Extents,  Prev: Duplicable Extents,  Up: Extents
  726.  
  727. Interaction of Extents with Keyboard and Mouse Events
  728. =====================================================
  729.  
  730.    If an extent has the `mouse-face' property set, it will be
  731. highlighted when the mouse passes over it.  Highlighting is accomplished
  732. by merging the extent's face with the face or faces specified by the
  733. `mouse-face' property.  The effect is as if a pseudo-extent with the
  734. `mouse-face' face were inserted after the extent in the display order
  735. (*note Extent Endpoints::., display order).
  736.  
  737.  - Variable: mouse-highlight-priority
  738.      This variable holds the priority to use when merging in the
  739.      highlighting pseudo-extent.  The default is 1000.  This is
  740.      purposely set very high so that the highlighting pseudo-extent
  741.      shows up even if there are other extents with various priorities
  742.      at the same location.
  743.  
  744.    You can also explicitly cause an extent to be highlighted.  Only one
  745. extent at a time can be highlighted in this fashion, and any other
  746. highlighted extent will be de-highlighted.
  747.  
  748.  - Function: highlight-extent EXTENT &optional HIGHLIGHT-P
  749.      This function highlights (if HIGHLIGHT-P is non-`nil') or
  750.      de-highlights (if HIGHLIGHT-P is `nil') EXTENT, if EXTENT has the
  751.      `mouse-face' property. (Nothing happens if EXTENT does not have
  752.      the `mouse-face' property.)
  753.  
  754.  - Function: force-highlight-extent EXTENT &optional HIGHLIGHT-P
  755.      This function is similar to `highlight-extent' but highlights or
  756.      de-highlights the extent regardless of whether it has the
  757.      `mouse-face' property.
  758.  
  759.    If an extent has a `keymap' property, this keymap will be consulted
  760. for mouse clicks on the extent and keypresses made while `point' is
  761. within the extent.  The behavior of mouse clicks and keystrokes not
  762. defined in the keymap is as normal for the buffer.
  763.  
  764. 
  765. File: lispref.info,  Node: Atomic Extents,  Prev: Extents and Events,  Up: Extents
  766.  
  767. Atomic Extents
  768. ==============
  769.  
  770.    If the Lisp file `atomic-extents' is loaded, then the atomic extent
  771. facility is available.  An "atomic extent" is an extent for which
  772. `point' cannot be positioned anywhere within it.  This ensures that
  773. when selecting text, either all or none of the extent is selected.
  774.  
  775.    To make an extent atomic, set its `atomic' property.
  776.  
  777. 
  778. File: lispref.info,  Node: Specifiers,  Next: Faces and Window-System Objects,  Prev: Extents,  Up: Top
  779.  
  780. Specifiers
  781. **********
  782.  
  783.    A specifier is an object used to keep track of a property whose value
  784. may vary depending on the particular situation (e.g. particular buffer
  785. displayed in a particular window) that it is used in.  The value of many
  786. built-in properties, such as the font, foreground, background, and such
  787. properties of a face and variables such as `modeline-shadow-thickness'
  788. and `top-toolbar-height', is actually a specifier object.  The
  789. specifier object, in turn, is "instanced" in a particular situation to
  790. yield the real value of the property in that situation.
  791.  
  792.  - Function: specifierp OBJECT
  793.      This function returns non-`nil' if OBJECT is a specifier.
  794.  
  795. * Menu:
  796.  
  797. * Introduction to Specifiers::    Specifiers provide a clean way for
  798.                 display and other properties to vary
  799.                 (under user control) in a wide variety
  800.                 of contexts.
  801. * Specifiers In-Depth::        Gory details about specifier innards.
  802. * Specifier Instancing::    Instancing means obtaining the "value" of
  803.                 a specifier in a particular context.
  804. * Specifier Types::        Specifiers come in different flavors.
  805. * Adding Specifications::    Specifications control a specifier's "value"
  806.                 by giving conditions under which a
  807.                 particular value is valid.
  808. * Retrieving Specifications::    Querying a specifier's specifications.
  809. * Specifier Tag Functions::    Working with specifier tags.
  810. * Specifier Instancing Functions::
  811.                 Functions to instance a specifier.
  812. * Specifier Example::        Making all this stuff clearer.
  813. * Creating Specifiers::        Creating specifiers for your own use.
  814. * Specifier Validation Functions::
  815.                 Validating the components of a specifier.
  816. * Other Specification Functions::
  817.                 Other ways of working with specifications.
  818.  
  819. 
  820. File: lispref.info,  Node: Introduction to Specifiers,  Next: Specifiers In-Depth,  Up: Specifiers
  821.  
  822. Introduction to Specifiers
  823. ==========================
  824.  
  825.    Sometimes you may want the value of a property to vary depending on
  826. the context the property is used in.  A simple example of this in XEmacs
  827. is buffer-local variables.  For example, the variable
  828. `modeline-format', which controls the format of the modeline, can have
  829. different values depending on the particular buffer being edited.  The
  830. variable has a default value which most modes will use, but a
  831. specialized package such as Calendar might change the variable so as to
  832. tailor the modeline to its own purposes.
  833.  
  834.    Other properties (such as those that can be changed by the
  835. `modify-frame-parameters' function, for example the color of the text
  836. cursor) can have frame-local values, although it might also make sense
  837. for them to have buffer-local values.  In other cases, you might want
  838. the property to vary depending on the particular window within the
  839. frame that applies (e.g. the top or bottom window in a split frame), the
  840. device type that that frame appears on (X or tty), etc.  Perhaps you can
  841. envision some more complicated scenario where you want a particular
  842. value in a specified buffer, another value in all other buffers
  843. displayed on a particular frame, another value in all other buffers
  844. displayed in all other frames on any mono (two-color, e.g. black and
  845. white only) displays, and a default value in all other circumstances.
  846.  
  847.    A "specifier" is a generalization of this, allowing a great deal of
  848. flexibility in controlling exactly what value a property has in which
  849. circumstances.  It is most commonly used for display properties, such as
  850. an image or the foreground color of a face.  As a simple example, you
  851. can specify that the foreground of the default face be
  852.  
  853.    * blue for a particular buffer
  854.  
  855.    * green for all other buffers
  856.  
  857.    As a more complicated example, you could specify that the foreground
  858. of the default face be
  859.  
  860.    * forest green for all buffers displayed in a particular Emacs
  861.      window, or green if the X server doesn't recognize the color
  862.      `forest green'
  863.  
  864.    * blue for all buffers displayed in a particular frame
  865.  
  866.    * red for all other buffers displayed on a color device
  867.  
  868.    * white for all other buffers
  869.  
  870. 
  871. File: lispref.info,  Node: Specifiers In-Depth,  Next: Specifier Instancing,  Prev: Introduction to Specifiers,  Up: Specifiers
  872.  
  873. In-Depth Overview of a Specifier
  874. ================================
  875.  
  876.    A specifier object encapsulates a set of "specifications", each of
  877. which says what its value should be if a particular condition applies.
  878. For example, one specification might be "The value should be
  879. darkseagreen2 on X devices" another might be "The value should be blue
  880. in the *Help* buffer".  In specifier terminology, these conditions are
  881. called "locales" and the values are called "instantiators".  Given a
  882. specifier, a logical question is "What is its value in a particular
  883. situation?" This involves looking through the specifications to see
  884. which ones apply to this particular situation, and perhaps preferring
  885. one over another if more than one applies.  In specifier terminology, a
  886. "particular situation" is called a "domain", and determining its value
  887. in a particular domain is called "instancing".  Most of the time, a
  888. domain is identified by a particular window.  For example, if the
  889. redisplay engine is drawing text in the default face in a particular
  890. window, it retrieves the specifier for the foreground color of the
  891. default face and "instances" it in the domain given by that window; in
  892. other words, it asks the specifier, "What is your value in this
  893. window?".
  894.  
  895.    More specifically, a specifier contains a set of "specifications",
  896. each of which associates a "locale" (a buffer object, a window object,
  897. a frame object, a device object, or the symbol `global') with an
  898. "inst-list", which is a list of one or more "inst-pairs". (For each
  899. possible locale, there can be at most one specification containing that
  900. locale.) Each inst-pair is a cons of a "tag set" (an unordered list of
  901. zero or more symbols, or "tags") and an "instantiator" (the allowed
  902. form of this varies depending on the type of specifier).  In a given
  903. specification, there may be more than one inst-pair with the same tag
  904. set; this is unlike for locales.
  905.  
  906.    The tag set is used to restrict the sorts of devices over which the
  907. instantiator is valid and to uniquely identify instantiators added by a
  908. particular application, so that different applications can work on the
  909. same specifier and not interfere with each other.  Each tag can have a
  910. "predicate" associated with it, which is a function of one argument (a
  911. device) that specifies whether the tag matches that particular device.
  912. (If a tag does not have a predicate, it matches all devices.)  All tags
  913. in a tag set must match a device for the associated inst-pair to be
  914. instantiable over that device.  (A null tag set is perfectly valid.)
  915.  
  916.    The valid device types (normally `x', `tty', and `stream') and
  917. device classes (normally `color', `grayscale', and `mono') can always
  918. be used as tags, and match devices of the associated type or class
  919. (*note Consoles and Devices::.).  User-defined tags may be defined,
  920. with an optional predicate specified.  An application can create its
  921. own tag, use it to mark all its instantiators, and be fairly confident
  922. that it will not interfere with other applications that modify the same
  923. specifier - Functions that add a specification to a specifier usually
  924. only overwrite existing inst-pairs with the same tag set as was given,
  925. and a particular tag or tag set can be specified when removing
  926. instantiators.
  927.  
  928.    When a specifier is instanced in a domain, both the locale and the
  929. tag set can be viewed as specifying necessary conditions that must
  930. apply in that domain for an instantiator to be considered as a possible
  931. result of the instancing.  More specific locales always override more
  932. general locales (thus, there is no particular ordering of the
  933. specifications in a specifier); however, the tag sets are simply
  934. considered in the order that the inst-pairs occur in the
  935. specification's inst-list.
  936.  
  937.    Note also that the actual object that results from the instancing
  938. (called an "instance object") may not be the same as the instantiator
  939. from which it was derived.  For some specifier types (such as integer
  940. specifiers and boolean specifiers), the instantiator will be returned
  941. directly as the instance object.  For other types, however, this is not
  942. the case.  For example, for font specifiers, the instantiator is a
  943. font-description string and the instance object is a font-instance
  944. object, which describes how the font is displayed on a particular
  945. device.  A font-instance object encapsulates such things as the actual
  946. font name used to display the font on that device (a font-description
  947. string under X is usually a wildcard specification that may resolve to
  948. different font names, with possibly different foundries, widths, etc.,
  949. on different devices), the extra properties of that font on that
  950. device, etc.  Furthermore, this conversion (called "instantiation")
  951. might fail - a font or color might not exist on a particular device,
  952. for example.
  953.  
  954. 
  955. File: lispref.info,  Node: Specifier Instancing,  Next: Specifier Types,  Prev: Specifiers In-Depth,  Up: Specifiers
  956.  
  957. How a Specifier Is Instanced
  958. ============================
  959.  
  960.    Instancing of a specifier in a particular window domain proceeds as
  961. follows:
  962.  
  963.    * First, XEmacs searches for a specification whose locale is the
  964.      same as the window's buffer.  If that fails, the search is
  965.      repeated, looking for a locale that is the same as the window
  966.      itself.  If that fails, the search is repeated using the window's
  967.      frame, then using the device that frame is on.  Finally, the
  968.      specification whose locale is the symbol `global' (if there is
  969.      such a specification) is considered.
  970.  
  971.    * The inst-pairs contained in the specification that was found are
  972.      considered in their order in the inst-list, looking for one whose
  973.      tag set matches the device that is derived from the window domain.
  974.      (The tag set is an unordered list of zero or more tag symbols.
  975.      For all tags that have predicates associated with them, the
  976.      predicate must match the device.)
  977.  
  978.    * If a matching tag set is found, the corresponding instantiator is
  979.      passed to the specifier's instantiation method, which is specific
  980.      to the type of the specifier.  If it succeeds, the resulting
  981.      instance object is returned as the result of the instancing and
  982.      the instancing is done.  Otherwise, the operation continues,
  983.      looking for another matching inst-pair in the current
  984.      specification.
  985.  
  986.    * When there are no more inst-pairs to be considered in the current
  987.      specification, the search starts over, looking for another
  988.      specification as in the first step above.
  989.  
  990.    * If all specifications are exhausted and no instance object can be
  991.      derived, the instancing fails. (Actually, this is not completely
  992.      true.  Some specifier objects for built-in properties have a
  993.      "fallback" value, which is either an inst-list or another
  994.      specifier object, that is consulted if the instancing is about to
  995.      fail.  If it is an inst-list, the searching proceeds using the
  996.      inst-pairs in that list.  If it is a specifier, the entire
  997.      instancing starts over using that specifier instead of the given
  998.      one.  Fallback values are set by the C code and cannot be
  999.      modified, except perhaps indirectly, using any Lisp functions.
  1000.      The purpose of them is to supply some values to make sure that
  1001.      instancing of built-in properties can't fail and to implement some
  1002.      basic specifier inheritance, such as the fact that faces inherit
  1003.      their properties from the `default' face.)
  1004.  
  1005.    It is also possible to instance a specifier over a frame domain or
  1006. device domain instead of over a window domain.  The C code, for example,
  1007. instances the `top-toolbar-height' variable over a frame domain in
  1008. order to determine the height of a frame's top toolbar.  Instancing over
  1009. a frame or device is similar to instancing over a window except that
  1010. specifications for locales that cannot be derived from the domain are
  1011. ignored.  Specifically, instancing over a frame looks first for frame
  1012. locales, then device locales, then the `global' locale.  Instancing
  1013. over a device domain looks only for device locales and the `global'
  1014. locale.
  1015.  
  1016. 
  1017. File: lispref.info,  Node: Specifier Types,  Next: Adding Specifications,  Prev: Specifier Instancing,  Up: Specifiers
  1018.  
  1019. Specifier Types
  1020. ===============
  1021.  
  1022.    There are various different types of specifiers.  The type of a
  1023. specifier controls what sorts of instantiators are valid, how an
  1024. instantiator is instantiated, etc.  Here is a list of built-in specifier
  1025. types:
  1026.  
  1027. `boolean'
  1028.      The valid instantiators are the symbols `t' and `nil'.  Instance
  1029.      objects are the same as instantiators so no special instantiation
  1030.      function is needed.
  1031.  
  1032. `integer'
  1033.      The valid instantiators are integers.  Instance objects are the
  1034.      same as instantiators so no special instantiation function is
  1035.      needed.  `modeline-shadow-thickness' is an example of an integer
  1036.      specifier (negative thicknesses indicate that the shadow is drawn
  1037.      recessed instead of raised).
  1038.  
  1039. `natnum'
  1040.      The valid instantiators are natnums (non-negative integers).
  1041.      Instance objects are the same as instantiators so no special
  1042.      instantiation function is needed.  Natnum specifiers are used for
  1043.      dimension variables such as `top-toolbar-height'.
  1044.  
  1045. `generic'
  1046.      All Lisp objects are valid instantiators.  Instance objects are
  1047.      the same as instantiators so no special instantiation function is
  1048.      needed.
  1049.  
  1050. `font'
  1051.      The valid instantiators are strings describing fonts or vectors
  1052.      indicating inheritance from the font of some face.  Instance
  1053.      objects are font-instance objects, which are specific to a
  1054.      particular device.  The instantiation method for font specifiers
  1055.      can fail, unlike for integer, natnum, boolean, and generic
  1056.      specifiers.
  1057.  
  1058. `color'
  1059.      The valid instantiators are strings describing colors or vectors
  1060.      indicating inheritance from the foreground or background of some
  1061.      face.  Instance objects are color-instance objects, which are
  1062.      specific to a particular device.  The instantiation method for
  1063.      color specifiers can fail, as for font specifiers.
  1064.  
  1065. `image'
  1066.      Images are perhaps the most complicated type of built-in
  1067.      specifier.  The valid instantiators are strings (a filename,
  1068.      inline data for a pixmap, or text to be displayed in a text glyph)
  1069.      or vectors describing inline data of various sorts or indicating
  1070.      inheritance from the background-pixmap property of some face.
  1071.      Instance objects are either strings (for text images),
  1072.      image-instance objects (for pixmap images), or subwindow objects
  1073.      (for subwindow images).  The instantiation method for image
  1074.      specifiers can fail, as for font and color specifiers.
  1075.  
  1076. `face-boolean'
  1077.      The valid instantiators are the symbols `t' and `nil' and vectors
  1078.      indicating inheritance from a boolean property of some face.
  1079.      Specifiers of this sort are used for all of the built-in boolean
  1080.      properties of faces.  Instance objects are either the symbol `t'
  1081.      or the symbol `nil'.
  1082.  
  1083. `toolbar'
  1084.      The valid instantiators are toolbar descriptors, which are lists
  1085.      of toolbar-button descriptors (each of which is a vector of two or
  1086.      four elements).  *Note Toolbar:: for more information.
  1087.  
  1088.    Color and font instance objects can also be used in turn as
  1089. instantiators for a new color or font instance object.  Since these
  1090. instance objects are device-specific, the instantiator can be used
  1091. directly as the new instance object, but only if they are of the same
  1092. device.  If the devices differ, the base color or font of the
  1093. instantiating object is effectively used instead as the instantiator.
  1094.  
  1095.    *Note Faces and Window-System Objects:: for more information on
  1096. fonts, colors, and face-boolean specifiers.  *Note Glyphs:: for more
  1097. information about image specifiers.  *Note Toolbar:: for more
  1098. information on toolbar specifiers.
  1099.  
  1100.  - Function: specifier-type SPECIFIER
  1101.      This function returns the type of SPECIFIER.  The returned value
  1102.      will be a symbol: one of `integer', `boolean', etc., as listed in
  1103.      the above table.
  1104.  
  1105.    Functions are also provided to query whether an object is a
  1106. particular kind of specifier:
  1107.  
  1108.  - Function: boolean-specifier-p OBJECT
  1109.      This function returns non-`nil' if OBJECT is a boolean specifier.
  1110.  
  1111.  - Function: integer-specifier-p OBJECT
  1112.      This function returns non-`nil' if OBJECT is an integer specifier.
  1113.  
  1114.  - Function: natnum-specifier-p OBJECT
  1115.      This function returns non-`nil' if OBJECT is a natnum specifier.
  1116.  
  1117.  - Function: generic-specifier-p OBJECT
  1118.      This function returns non-`nil' if OBJECT is a generic specifier.
  1119.  
  1120.  - Function: face-boolean-specifier-p OBJECT
  1121.      This function returns non-`nil' if OBJECT is a face-boolean
  1122.      specifier.
  1123.  
  1124.  - Function: toolbar-specifier-p OBJECT
  1125.      This function returns non-`nil' if OBJECT is a toolbar specifier.
  1126.  
  1127.  - Function: font-specifier-p OBJECT
  1128.      This function returns non-`nil' if OBJECT is a font specifier.
  1129.  
  1130.  - Function: color-specifier-p OBJECT
  1131.      This function returns non-`nil' if OBJECT is a color specifier.
  1132.  
  1133.  - Function: image-specifier-p OBJECT
  1134.      This function returns non-`nil' if OBJECT is an image specifier.
  1135.  
  1136.